home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / LgcyPlus / DISK1 / HTBPLUS.MS_ / HTBPLUS.MS
Encoding:
Text File  |  2001-03-02  |  15.5 KB  |  586 lines

  1. '**************************************************************************
  2. '*             HTBasic Plus for Windows Setup Script (20-Feb-96)
  3. '**************************************************************************
  4.  
  5. '$INCLUDE 'setupapi.inc'
  6. '$INCLUDE 'msdetect.inc'
  7.  
  8. ''Dialog ID's
  9. CONST WELCOME                  = 100
  10. CONST ASKQUIT                  = 200
  11. CONST DESTPATH                 = 300
  12. CONST EXITFAILURE              = 400
  13. CONST EXITQUIT                 = 600
  14. CONST EXITSUCCESS              = 700
  15. CONST OPTIONS                  = 800
  16. CONST BADPATH                  = 6400
  17.  
  18. CONST HELPWELCOME              = 1000
  19. CONST VERPATH                  = 1100
  20. CONST EXITFAILNOTWIN31         = 1200
  21. CONST EXITFAILNOTENH           = 1300
  22. CONST EXITFAILNOTPAGING        = 1325
  23. CONST EXITFAILNOTINTEL         = 1350
  24. CONST EXITFAILRUNAPP           = 1360
  25.  
  26. ''Bitmap ID
  27. CONST LOGO = 1
  28.  
  29. CONST EXITSUCCESSW32S   = 701
  30. CONST INSTHELP          = 800
  31. CONST WELCOMEHELP       = 900
  32. CONST CUSTINST          = 6200
  33. CONST TOOBIG            = 6300
  34. CONST NOWIN32S          = 6500
  35.  
  36. ''File Types
  37. CONST PLUSFILES    = 1
  38. CONST PLUSEXFILES  = 2
  39.  
  40. CONST SW_SHOW      = 5
  41.  
  42. GLOBAL DEST$        ''Default destination directory.
  43. GLOBAL DESTSYS$      ''Windows\System directory.
  44. GLOBAL WINDRIVE$    ''Windows drive letter.
  45. GLOBAL NTSYS$        ''Windows\System32 directory
  46. GLOBAL WINNT%
  47.  
  48. ''CustInst list symbol names
  49. GLOBAL PlusNEEDS$   ''Option list costs per drive
  50. GLOBAL PlusExNEEDS$
  51. GLOBAL EXTRACOSTS$  ''List of extra costs to add per drive
  52. GLOBAL BIGLIST$     ''List of option files cost calc results (boolean)
  53.  
  54. ''Dialog list symbol names
  55. GLOBAL CHECKSTATES$
  56. GLOBAL STATUSTEXT$
  57. GLOBAL DRIVETEXT$
  58.  
  59. GLOBAL FIRSTTIME%
  60. GLOBAL WIN31INSTALLED%
  61.  
  62. DECLARE SUB WinExec LIB "kernel" (szCmdLine$, nCmdShow%)
  63. DECLARE SUB AddOptFilesToCopyList (ftype%)
  64. DECLARE SUB RecalcOptFiles (ftype%)
  65. DECLARE SUB RecalcPath
  66. DECLARE SUB SetDriveStatus
  67. DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
  68. DECLARE FUNCTION OnWindowsNT LIB "INIUPD.DLL" AS INTEGER
  69. DECLARE FUNCTION IsRunningApp LIB "INIUPD.DLL" AS INTEGER
  70.  
  71.  
  72.  
  73. INIT:
  74.  
  75.     AP_CUIDLL$ = "htcuistf.dll"         ''custom user interface dll
  76.     HELPPROC$ = "FHelpDlgProc"          ''Help dialog procedure
  77.  
  78.     SetBitmap AP_CUIDLL$, LOGO
  79.     SetTitle "TransEra HTBasic Plus 5.2 Setup"
  80.  
  81.     szInf$ = GetSymbolValue("STF_SRCINFPATH")
  82.     IF szInf$ = "" THEN
  83.         szInf$ = GetSymbolValue("STF_CWDDIR") + "HTBPLUS.INF"
  84.     END IF
  85.     ReadInfFile szInf$
  86.  
  87.     WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
  88.     DEST$ = WINDRIVE$ + ":\HTBWin"
  89.     DESTSYS$ = GetWindowsSysDir()
  90.     NTSYS$ = GetWindowsDir() + "System32\"
  91.  
  92.     ''CustInst list symbols
  93.     CHECKSTATES$ = "CheckItemsState"
  94.     STATUSTEXT$  = "StatusItemsText"
  95.     DRIVETEXT$   = "DriveStatusText"
  96.     FOR i% = 1 TO 2 STEP 1
  97.         AddListItem CHECKSTATES$, "ON"
  98.     NEXT i%
  99.     FOR i% = 1 TO 2 STEP 1
  100.         AddListItem STATUSTEXT$, ""
  101.     NEXT i%
  102.     FOR i% = 1 TO 7 STEP 1
  103.         AddListItem DRIVETEXT$, ""
  104.     NEXT i%
  105.     ReplaceListItem DRIVETEXT$, 7, DEST$
  106.  
  107.     ''Disk cost list symbols
  108.     PlusNEEDS$  = "PlusNeeds"
  109.     PlusExNEEDS$= "PlusExNeeds"
  110.     EXTRACOSTS$ = "ExtraCosts"
  111.     BIGLIST$    = "BigList"
  112.     FOR i% = 1 TO 2 STEP 1
  113.         AddListItem BIGLIST$, ""
  114.     NEXT i%
  115.     FOR i% = 1 TO 26 STEP 1
  116.         AddListItem EXTRACOSTS$, "0"
  117.     NEXT i%
  118.  
  119.     FIRSTTIME% = 1
  120.     RecalcPath
  121.     SetDriveStatus
  122.  
  123. AP_WELCOME:
  124.     sz$ = UIStartDlg(AP_CUIDLL$, WELCOME, "FInfoDlgProc", WELCOMEHELP, HELPPROC$)
  125.     IF sz$ = "CONTINUE" THEN
  126.         UIPop 1
  127.     ELSE
  128.         UIPop 1
  129.         GOSUB AP_ASKQUIT
  130.         GOTO AP_WELCOME
  131.     END IF
  132.  
  133. CHECK:
  134.     WIN31INSTALLED% = 0    '' BOB
  135.     '' Can not run on versions less than 3.10.
  136.     IF GetWindowsMajorVersion < 3 THEN
  137.         ExitCode% = EXITFAILNOTWIN31
  138.         GOTO QUIT
  139.     END IF
  140.     IF GetWindowsMajorVersion = 3 AND GetWindowsMinorVersion < 10 THEN
  141.         ExitCode% = EXITFAILNOTWIN31
  142.         GOTO QUIT
  143.     END IF
  144.     '' Check that we are not runnig on Chicago, including pre-released
  145.     '' Chicago versions.
  146.     IF GetWindowsMajorVersion * 100 + GetWindowsMinorVersion > 350 THEN
  147.         ExitCode% = EXITSUCCESS
  148.         GOTO INSTALLED
  149.     END IF
  150.     IF GetWindowsMode < 2  THEN
  151.         IF OnWindowsNT() THEN
  152.             ExitCode% = EXITFAILNOTINTEL '' Running on Windows NT (on RISC)
  153.         ELSE
  154.             ExitCode% = EXITFAILNOTENH   '' Standard Mode Windows
  155.         END IF
  156.         GOTO QUIT
  157.     END IF
  158.     IF OnWindowsNT() THEN
  159.         ExitCode% = EXITSUCCESS
  160.         WINNT% = 1
  161.         GOTO INSTALLED
  162.     END IF
  163.     ExitCode% = EXITSUCCESS
  164.  
  165.     if IsRunningApp() <> 0 THEN
  166.         ExitCode% = EXITFAILRUNAPP
  167.         GOTO QUIT
  168.     END IF
  169.  
  170.     WIN31INSTALLED% = 1    '' BOB
  171.  
  172. INSTALLED:
  173.  
  174. QUIT:
  175.     '' Install error handler for final message box routines
  176.     ON ERROR GOTO ERRQUIT
  177.     IF ERR = 0 THEN
  178.         dlg% = ExitCode%
  179.     ELSEIF ERR = STFQUIT THEN
  180.         dlg% = EXITQUIT
  181.         ExitCode% = EXITQUIT
  182.     ELSE
  183.         dlg% = EXITFAILURE
  184.         ExitCode% = EXITQUIT
  185.     END IF
  186.  
  187. QUITL1:
  188.     IF ExitCode% = EXITSUCCESS THEN
  189.         GOTO AP_CUSTINST
  190.     END IF
  191.  
  192.     UIPop 1
  193.     END
  194.  
  195.  
  196. '' Fatal error handler for error message routine
  197. ERRQUIT:
  198. ''  i% = DoMsgBox("Setup sources were corrupted!", "Setup Message", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  199.     END
  200.  
  201. '' Bypass run-time errors. Let final dialog box display fatal error message.
  202. ERRNORMAL:
  203.     '' Check if user cancelled setup
  204.     IF ERR = STFQUIT THEN
  205.     GOTO QUIT
  206.     END IF
  207.     RESUME NEXT
  208.  
  209.  
  210. BADPATH:
  211.     sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
  212.     IF sz$ = "REACTIVATE" THEN
  213.         GOTO BADPATH
  214.     END IF
  215.         UIPop 1
  216.     RETURN
  217.  
  218. ASKQUIT:
  219.     sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
  220.  
  221.     IF sz$ = "EXIT" THEN
  222.         UIPop 1
  223.         UIPopAll
  224.         ERROR STFQUIT
  225.     ELSEIF sz$ = "REACTIVATE" THEN
  226.         GOTO ASKQUIT
  227.     ELSE
  228.         UIPop 1
  229.     END IF
  230.     RETURN
  231.  
  232.  
  233.  
  234. '' Display Main Dialog Box:
  235.  
  236. AP_CUSTINST:
  237.  
  238.     sz$ = UIStartDlg(AP_CUIDLL$, CUSTINST, "FCustInstDlgProc", INSTHELP, HELPPROC$)
  239.  
  240.     IF sz$ = "CONTINUE" THEN
  241.         ''Install only if it will fit.
  242.         FOR i% = 1 TO 2 STEP 1
  243.             IF GetListItem(BIGLIST$, i%) <> "" THEN
  244.                 GOSUB AP_TOOBIG
  245.                 GOTO AP_CUSTINST
  246.             END IF
  247.         NEXT i%
  248.         UIPop 1
  249.         GOTO AP_INSTALL
  250.     ELSEIF sz$ = "PATH" THEN
  251.         GOTO AP_GETPATH
  252.     ELSEIF sz$ = "CHK1" THEN
  253.         RecalcOptFiles PLUSFILES
  254.         SetDriveStatus
  255.         GOTO AP_CUSTINST
  256.     ELSEIF sz$ = "CHK2" THEN
  257.         RecalcOptFiles PLUSEXFILES
  258.         SetDriveStatus
  259.         GOTO AP_CUSTINST
  260.     ELSEIF sz$ = "REACTIVATE" THEN
  261.         RecalcPath
  262.         SetDriveStatus
  263.         GOTO AP_CUSTINST
  264.     ELSE
  265.         GOSUB AP_ASKQUIT
  266.         GOTO AP_CUSTINST
  267.     END IF
  268.     END
  269.  
  270. AP_INSTALL:
  271.  
  272.     ClearCopyList
  273.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  274.  
  275.     IF GetListItem(CHECKSTATES$, PLUSFILES) = "ON" THEN
  276.        IF WIN31INSTALLED% = 1 THEN
  277.          AddSectionFilesToCopyList "Win31Files", SrcDir$, DESTSYS$
  278.        END IF
  279.        IF WINNT% = 1 THEN
  280.          AddSectionFilesToCopyList "WinNTFiles", SrcDir$, NTSYS$
  281.        END IF
  282.     END IF
  283.     AddOptFilesToCopyList PLUSFILES
  284.     AddOptFilesToCopyList PLUSEXFILES
  285.     CreateDir DEST$, cmoNone
  286.     CopyFilesInCopyList
  287.  
  288.     CreateProgmanGroup "TransEra HTBasic", "", cmoNone
  289.     ShowProgmanGroup  "TransEra HTBasic", 1, cmoNone
  290.     IF GetListItem(CHECKSTATES$, PLUSFILES) = "ON" THEN
  291.         CreateProgmanItem "TransEra HTBasic", "HTBasic Plus Help", MakePath(DEST$,"BPLUS.HLP"), "", cmoOverwrite
  292.         CreateProgmanItem "TransEra HTBasic", "BPLUS.TXT", "NOTEPAD "+MakePath(DEST$,"BPLUS.TXT"), "", cmoOverwrite
  293.         CreateProgmanItem "TransEra HTBasic", "Screen Builder", MakePath(DEST$,"SCR_BLDR.EXE"), "", cmoOverwrite
  294.     END IF
  295.  
  296. AP_QUIT:
  297.     ON ERROR GOTO AP_ERRQUIT
  298.  
  299.     IF ERR = 0 THEN
  300.         dlg% = EXITSUCCESS
  301.     ELSEIF ERR = STFQUIT THEN
  302.         dlg% = EXITQUIT
  303.     ELSE
  304.         dlg% = EXITFAILURE
  305.     END IF
  306. AP_QUITL1:
  307.     IF dlg% = EXITSUCCESS THEN
  308.         sz$ = UIStartDlg(AP_CUIDLL$, EXITSUCCESS, "FInfo0DlgProc", 0, "")
  309.     ELSE
  310.         sz$ = UIStartDlg(AP_CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
  311.     END IF
  312.     IF sz$ = "REACTIVATE" THEN
  313.         GOTO AP_QUITL1
  314.     ELSEIF sz$ = "BACK" THEN
  315.         WinExec "NOTEPAD " + MakePath(DEST$, "BPLUS.TXT"), SW_SHOW
  316.         GOTO AP_QUITL1
  317.     END IF
  318.     UIPop 1
  319.  
  320.     END
  321.  
  322.  
  323. AP_ERRQUIT:
  324. ''  i% = DoMsgBox("Setup sources were corrupted!", "Setup Message", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  325.     END
  326.  
  327.  
  328.  
  329. AP_GETPATH:
  330.     SetSymbolValue "EditTextIn", DEST$
  331.     SetSymbolValue "EditFocus", "END"
  332. AP_GETPATHL1:
  333.     sz$ = UIStartDlg(AP_CUIDLL$, DESTPATH, "FEditDlgProc", WELCOMEHELP, HELPPROC$)
  334.  
  335.     IF sz$ = "CONTINUE" THEN
  336.         olddest$ = DEST$
  337.         DEST$ = GetSymbolValue("EditTextOut")
  338.  
  339.         ''Validate new path.
  340.         IF IsDirWritable(DEST$) = 0 THEN
  341.             GOSUB AP_BADPATH
  342.             GOTO AP_GETPATHL1
  343.         END IF
  344.         UIPop 1
  345.  
  346.         ''Truncate display if too long.
  347.         IF LEN(DEST$) > 23 THEN
  348.             ReplaceListItem DRIVETEXT$, 7, MID$(DEST$, 1, 23)+"..."
  349.         ELSE
  350.             ReplaceListItem DRIVETEXT$, 7, DEST$
  351.         END IF
  352.  
  353.         ''Recalc if path changed.
  354.         IF (olddest$ <> DEST$) AND (olddest$ <> DEST$+"\") AND (olddest$+"\" <> DEST$) THEN
  355.             RecalcPath
  356.             SetDriveStatus
  357.         END IF
  358.  
  359.         olddest$ = ""
  360.         GOTO AP_CUSTINST
  361.     ELSEIF sz$ = "REACTIVATE" THEN
  362.         RecalcPath
  363.         SetDriveStatus
  364.         GOTO AP_GETPATHL1
  365.     ELSEIF sz$ = "EXIT" THEN
  366.         GOSUB AP_ASKQUIT
  367.         GOTO AP_GETPATHL1
  368.     ELSE
  369.         UIPop 1
  370.         GOTO AP_CUSTINST
  371.     END IF
  372.  
  373.  
  374.  
  375. AP_TOOBIG:
  376.     sz$ = UIStartDlg(AP_CUIDLL$, TOOBIG, "FInfo0DlgProc", 0, "")
  377.     IF sz$ = "REACTIVATE" THEN
  378.         RecalcPath
  379.         SetDriveStatus
  380.         GOTO AP_TOOBIG
  381.     END IF
  382.     UIPop 1
  383.     RETURN
  384.  
  385.  
  386.  
  387. AP_BADPATH:
  388.     sz$ = UIStartDlg(AP_CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
  389.     IF sz$ = "REACTIVATE" THEN
  390.         RecalcPath
  391.         SetDriveStatus
  392.         GOTO AP_BADPATH
  393.     END IF
  394.     UIPop 1
  395.     RETURN
  396.  
  397.  
  398.  
  399. AP_ASKQUIT:
  400.     sz$ = UIStartDlg(AP_CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
  401.  
  402.     IF sz$ = "EXIT" THEN
  403.         UIPopAll
  404.         ERROR STFQUIT
  405.     ELSEIF sz$ = "REACTIVATE" THEN
  406.         GOTO AP_ASKQUIT
  407.     ELSE
  408.         UIPop 1
  409.     END IF
  410.     RETURN
  411.  
  412.  
  413.  
  414. '**
  415. '** Purpose:
  416. '**     Adds the specified option files to the copy list.
  417. '** Arguments:
  418. '**     ftype%  - type of files to add, one of the following:
  419. '**             PLUSFILES, PLUSEXFILES
  420. '** Returns:
  421. '**     none.
  422. '*************************************************************************
  423. SUB AddOptFilesToCopyList (ftype%) STATIC
  424.  
  425.     IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
  426.         SrcDir$ = GetSymbolValue("STF_SRCDIR")
  427.         IF ftype% = PLUSFILES THEN
  428.             AddSectionFilesToCopyList "PlusFiles", SrcDir$, DEST$
  429.         ELSEIF ftype% = PLUSEXFILES THEN
  430.             AddSectionFilesToCopyList "PlusExFiles", SrcDir$, DEST$
  431.         END IF
  432.         SrcDir$ = ""
  433.     END IF
  434. END SUB
  435.  
  436.  
  437. '**
  438. '** Purpose:
  439. '**     Recalculates disk space for the given option files and sets
  440. '**     the status info symbol "StatusItemsText".
  441. '** Arguments:
  442. '**     ftype% - type of files to add, one of the following:
  443. '**             PLUSFILES, PLUSEXFILES
  444. '** Returns:
  445. '**     none.
  446. '*************************************************************************
  447. SUB RecalcOptFiles (ftype%) STATIC
  448.     CursorSave% = ShowWaitCursor()
  449.     ClearCopyList
  450.     AddOptFilesToCopyList ftype%
  451.  
  452.     fExtra% = 0
  453.     IF ftype% = PLUSFILES THEN
  454.         ListSym$ = PlusNEEDS$
  455.     ELSEIF ftype% = PLUSEXFILES THEN
  456.         ListSym$ = PlusExNEEDS$
  457.     END IF
  458.  
  459.     StillNeed& = GetCopyListCost(EXTRACOSTS$, ListSym$, "")
  460.  
  461.     cost& = 0
  462.     FOR i% = 1 TO 26 STEP 1
  463.         cost&  = cost& + VAL(GetListItem(ListSym$, i%))
  464.     NEXT i%
  465.  
  466.     IF ftype% = PLUSFILES AND GetListItem(CHECKSTATES$, PLUSFILES) = "ON" THEN
  467.        IF WIN31INSTALLED% = 1 THEN
  468.           sz$ = MakePath(DESTSYS$,"MSVCRT20.DLL")
  469.           IF DoesFileExist(sz$, femExists) = 0 THEN
  470.             cost& = cost& + 244736      ''size of MSVCRT20.32S
  471.           END IF
  472.        END IF
  473.        IF WINNT% = 1 THEN
  474.           sz$ = MakePath(NTSYS$,"MSVCRT20.DLL")
  475.           IF DoesFileExist(sz$, femExists) = 0 THEN
  476.             cost& = cost& + 253952      ''size of MSVCRT20.NT
  477.           END IF
  478.        END IF
  479.     END IF
  480.  
  481.     ReplaceListItem STATUSTEXT$, ftype%, STR$(cost& / 1024) + " K"
  482.  
  483.     IF FIRSTTIME% = 1 THEN
  484.         IF cost& > 0 THEN
  485.             ReplaceListItem CHECKSTATES$, ftype%, "ON"
  486.         ELSE
  487.             ReplaceListItem CHECKSTATES$, ftype%, "OFF"
  488.             ReplaceListItem STATUSTEXT$, ftype%, "Installed"
  489.         END IF
  490.     END IF
  491.  
  492.     IF StillNeed& > 0 THEN
  493.         ReplaceListItem BIGLIST$, ftype%, "YES"
  494.     ELSE
  495.         ReplaceListItem BIGLIST$, ftype%, ""
  496.     END IF
  497.  
  498.     RestoreCursor CursorSave%
  499.     ListSym$ = ""
  500. END SUB
  501.  
  502.  
  503. '**
  504. '** Purpose:
  505. '**     Recalculates disk space and sets option status info according
  506. '**     to the current destination path.
  507. '** Arguments:
  508. '**     none.
  509. '** Returns:
  510. '**     none.
  511. '*************************************************************************
  512. SUB RecalcPath STATIC
  513.  
  514.     CursorSave% = ShowWaitCursor()
  515.  
  516.     RecalcOptFiles PLUSFILES
  517.     RecalcOptFiles PLUSEXFILES
  518.     FIRSTTIME% = 0
  519.  
  520.     RestoreCursor CursorSave%
  521. END SUB
  522.  
  523.  
  524. '**
  525. '** Purpose:
  526. '**     Sets drive status info according to latest disk space calcs.
  527. '** Arguments:
  528. '**     none.
  529. '** Returns:
  530. '**     none.
  531. '*************************************************************************
  532. SUB SetDriveStatus STATIC
  533.  
  534.     drive$ = MID$(DEST$, 1, 1)
  535.     ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
  536.     cost& = VAL(GetListItem(PlusNEEDS$, ndrive%)) + VAL(GetListItem(PlusExNEEDS$, ndrive%))
  537.  
  538. '' FIX UP THE COSTS
  539.     IF GetListItem(CHECKSTATES$, PLUSFILES) = "ON" THEN
  540.       IF WIN31INSTALLED% = 1 THEN
  541.         sz$ = MakePath(DESTSYS$,"MSVCRT20.DLL")
  542.         IF DoesFileExist(sz$, femExists) = 0 THEN
  543.           cost& = cost& + 244736          ''size of MSVCRT20.32S
  544.         END IF
  545.       END IF
  546.       IF WINNT% = 1 THEN
  547.         sz$ = MakePath(NTSYS$,"MSVCRT20.DLL")
  548.         IF DoesFileExist(sz$, femExists) = 0 THEN
  549.           cost& = cost& + 253952          ''size of MSVCRT20.NT
  550.         END IF
  551.       END IF
  552.     END IF
  553.  
  554.     free& = GetFreeSpaceForDrive(drive$)
  555.     ReplaceListItem DRIVETEXT$, 1, drive$ + ":"
  556.     ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
  557.     ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
  558.  
  559.     ReplaceListItem DRIVETEXT$, 4, ""
  560.     ReplaceListItem DRIVETEXT$, 5, ""
  561.     ReplaceListItem DRIVETEXT$, 6, ""
  562. END SUB
  563.  
  564.  
  565. '**
  566. '** Purpose:
  567. '**     Appends a file name to the end of a directory path,
  568. '**     inserting a backslash character as needed.
  569. '** Arguments:
  570. '**     szDir$  - full directory path (with optional ending "\")
  571. '**     szFile$ - filename to append to directory
  572. '** Returns:
  573. '**     Resulting fully qualified path name.
  574. '*************************************************************************
  575. FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
  576.     IF szDir$ = "" THEN
  577.         MakePath = szFile$
  578.     ELSEIF szFile$ = "" THEN
  579.         MakePath = szDir$
  580.     ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
  581.         MakePath = szDir$ + szFile$
  582.     ELSE
  583.         MakePath = szDir$ + "\" + szFile$
  584.     END IF
  585. END FUNCTION
  586.